<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<TITLE>MakeMetafile Method</TITLE>
<link rel="stylesheet" type="text/css" href="help.css">
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000">

<OBJECT TYPE="application/x-oleobject" CLASSID="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
	<PARAM NAME="Keyword" VALUE="MakeMetafile Method">
	<PARAM NAME="Keyword" VALUE="Metafiles">
</OBJECT>

<H1><A NAME="makemetafile_method"></A><B>MakeMetafile Method</B></H1>
<HR>

<H2 class="AppliesTo">Applies to</H2>

<P><A HREF="thtmlviewer_component.htm">THtmlViewer</A> component</P>

<H2 class="Declaration">Declaration</H2>

<P>function MakeMetafile(YTop, FormatWidth, Width, Height: integer): TMetafile;</P>

<H2 class="Description">Description</H2>

<P>The <B>MakeMetafile</B> method produces a metafile of a portion of the document currently loaded.</P>

<P><I>YTop</I>The top of the metafile in pixels.  0 would be the start of the document.</P>

<P><I>FormatWidth</I>The width to which the HTML is to be formatted.  Text would typically wrap at this width.</P>

<P><I>Width</I>The width of the metafile.  This might be greater than <I>FormatWidth.</I></P>

<P><I>Height</I>The height of the metafile.</P>

<P><B>Usage Notes</B></P>

<P>Currently, the maximum Height allowed is 4000 pixels so some sort of paging is required for large documents.</P>

<P>Before calling <B>MakeMetafile</B>, use the <A HREF="fulldisplaysize_method.htm">FullDisplaySize</A> method to ascertain the overall formatted size so that the <B>MakeMetafile</B> parameters can be properly set.  The Width returned by <A HREF="fulldisplaysize_method.htm">FullDisplaySize</A> may exceed FormatWidth if the contents can't be successfully wrapped.  This Width should be used to specify the metafile width.  Alternatively, FormatWidth may be set to this Width and FullDisplaySize called again to obtain the new Height.</P>

<P>To make a series of metafiles that can be pieced together, use values for YTop of 0, Height, 2*Height, etc.</P>

<H2 class="SeeAlso">See Also:</H2>

<P><A HREF="fulldisplaysize_method.htm">FullDisplaySize Method</A></P>

<P><A HREF="makebitmap_method.htm">MakeBitmap Method</A></P>

<P><A HREF="makepagedmetafiles_method.htm">MakePagedMetafiles Method</A></P>

</BODY>
</HTML>
